SSH port forwarding. Connection refused [closed]

Posted by Kein on Server Fault See other posts from Server Fault or by Kein
Published on 2012-12-12T22:06:56Z Indexed on 2012/12/12 23:05 UTC
Read the original article Hit count: 304

Filed under:
|

I want to make a port forward from my public server to my home pc, to connect through ssh. What have I done wrong?

From home pc I run command:

ssh -R 8022:127.0.0.1:22 remote.host

Now when I try to connect with:

ssh remote.host -p 8022

I get error "Connection refused"

But when I connect to remote.host through ssh, and try to run:

ssh localhost -p 8022

It connects to my home PC.

How I can connect to home with one simple command?

ssh remote.host -p 8022

© Server Fault or respective owner

Related posts about ssh

Related posts about port-forwarding